/**
 * @author: sunc
 * @create: 2019-11-07 09:54
 * @version: 1.0
 * @email: sunc@oceansoft.com
 */
import axios from './request'

export class HttpUtils {
  static request({ url, data, method = 'get', responseType = 'json' }) {
    if (method === 'get') {
      return axios({
        url,
        method,
        params: data,
        responseType
      })
    }
    return axios({
      url,
      method,
      data,
      responseType
    })
  }
}
